package com.quantdo.qtm.mysql.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import com.quantdo.qtm.mysql.pojo.model.MysqlMonitorStatusKeyValDo;

@Mapper
public interface MonitorDao {

    /**
     * 查询mysql数据库状态
     * @return
     */
    @Select("SHOW GLOBAL STATUS")
    List<MysqlMonitorStatusKeyValDo> selectStatusKeyVal();
    /**
     * 数据库支持的最大连接数
     * @return
     */
    @Select("SHOW VARIABLES LIKE 'max_connections%'")
    List<MysqlMonitorStatusKeyValDo> selectMaxConnections();
    /**
     * INNODB缓冲池的页数
     * @return
     */
    @Select("SHOW VARIABLES LIKE 'innodb_page_size%'")
    List<MysqlMonitorStatusKeyValDo> selectInnodbPageSize();
    /**
     * MYISAM缓冲池的页数
     * @return
     */
    @Select("SHOW VARIABLES LIKE 'key_buffer_size%'")
    List<MysqlMonitorStatusKeyValDo> selectKeyBufferSize();

}
